package com.atguigu.gulimail.product.mq;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author Fengkai
 * @creat 2022/5/27
 */
@Slf4j
@Component
@RocketMQMessageListener(topic = "gulimail-product-msg", consumerGroup = "testGroup")
public class ProductComsumer implements RocketMQListener<String> {

    @Override
    public void onMessage (String s) {
        System.out.println(s);
        log.info(s);
    }
}